<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <form class="form-horizontal js-ajax-form" method="post">
        <fieldset>
            <div class="tabbable">
                <div class="tab-content">
                    <table class="table table-bordered">
                        <caption><span style="color:blue"><h2><span style="color:black;">{$data.c_name}</span> "今借到"信用报告</h2></span></caption>
                        <tr>
                            <td colspan="2">
                                <button id="update_jjd" style="float:right;" class="btn btn-primary btn-lg" type="button">单击以更新下列数据</button>
                            </td>
                        </tr>
                        <tr>
                            <td>姓名</td>
                            <td>{$data.c_name}</td>
                        </tr>
                        <tr>
                            <td>手机</td>
                            <td>{$data.c_telephone}</td>
                        </tr>
                        <tr>
                            <td>身份证号</td>
                            <td>{$data.c_id_card_no}</td>
                        </tr>
                        <tr>
                            <td>逾期数据源</td>
                            <td>{$data.c_platform_name}</td>
                        </tr>
                        <tr>
                            <td>当前逾期金额</td>
                            <td>{$data.n_current_overdue_amt}</td>
                        </tr>
                        <tr>
                            <td>最大逾期金额</td>
                            <td>{$data.n_history_overdue_max}</td>
                        </tr>
                        <tr>
                            <td>&gt; 7 天逾期金额</td>
                            <td>{$data.n_current_overdue_7days_amt}</td>
                        </tr>
                        <tr>
                            <td>&gt; 7 天逾期笔数</td>
                            <td>{$data.n_current_overdue_7days_cnt}</td>
                        </tr>
                        <tr>
                            <td>&gt; 30 天逾期金</td>
                            <td>{$data.n_overdue_30days_amt}</td>
                        </tr>
                        <tr>
                            <td>&gt; 30 天逾期笔</td>
                            <td>{$data.n_overdue_30days_cnt}</td>
                        </tr>
                        <tr>
                            <td>&gt; 90 天逾期金额</td>
                            <td>{$data.n_overdue_90days_amt}</td>
                        </tr>
                        <tr>
                            <td>&gt; 90天逾期笔数</td>
                            <td>{$data.n_overdue_90days_cnt}</td>
                        </tr>
                        <tr>
                            <td>累计借入金额</td>
                            <td>{$data.n_borrow_amt}</td>
                        </tr>
                        <tr>
                            <td>累计借入笔数</td>
                            <td>{$data.n_borrow_cn}</td>
                        </tr>
                        <tr>
                            <td>累计逾期金额</td>
                            <td>{$data.n_overdue_amt}</td>
                        </tr>
                        <tr>
                            <td>累计逾期次数</td>
                            <td>{$data.n_overdue_cnt}</td>
                        </tr>
                        <tr>
                            <td>用户是否存在</td>
                            <td>
                                <if condition="(int)$data['flag'] === 1">
                                    存在
                                    <else/>
                                    不存在
                                </if>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>

            <div class="form-actions">
            </div>
        </fieldset>
    </form>

</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
<script>
    $(function(){
        $('#update_jjd').click(function(){
            $.ajax({
                url: '{:U("refreshJjdInfo")}',
                type: "POST",
                dataType: "JSON",
                data: {
                    'id': '{$data.user_id}'
                },
                success: function (resp) {
                    if (1 === parseInt(resp.status)) {
                        Wind.use("artDialog", function () {
                            art.dialog({
                                id: new Date().getTime(),
                                fixed: true,
                                lock: true,
                                background: "#CCCCCC",
                                opacity: 0,
                                content: "数据更新成功，请刷新该页面",
                                ok: function () {
                                    return true;
                                }
                            });
                        });
                    }else{
                        artdialog_alert(resp.message);
                    }
                }
            });
        });
    });
</script>
</html>